import { t } from '@src/locales'

// 选人组件类型枚举
enum BaseSelectUserTypeEnum {
  Department = 'dept',
  Team = 'team',
  DepartmentOnly = 'dept_only'
}

// 选人组件 标签 tab 类型枚举
enum BaseSelectUserMarkTypeEnum {
  // 按部门
  Tag = 'tag',
  // 按角色
  Role = 'role',
  // 服务商
  ServiceProvider = 'sp',
  // 动态获取
  Dynamic = 'dynamic',
  // 触发器选人动态获取
  Da = 'da',
  // 按项目组
  ProjectTeam = 'projectTeam'
}

// 选人组件 类型 id 枚举
enum BaseSelectUserTypeIdEnum {
  // 用户
  User = 1,
  // 团队
  Tag = 2,
  // 部门
  Department = 3,
  // 角色
  Role = 4,
  // 服务商
  ServiceProvider = 5,
  // 动态获取
  Dynamic = 6,
}

enum BaseSelectUserSearchMoreTypeEnum {
  Organization = 'org',
  ServiceProvider = 'sp'
}

// 选人组件 错误信息 枚举
const BaseSelectUserErrorMessageEnum = {
  MarkList: t('component.baseSelectUser.BaseSelectUserErrorMessageEnum.MarkList'),
  DepartmentList: t('component.baseSelectUser.BaseSelectUserErrorMessageEnum.DepartmentList'),
  StateList: t('component.baseSelectUser.BaseSelectUserErrorMessageEnum.StateList'),
  LabelList: t('component.baseSelectUser.BaseSelectUserErrorMessageEnum.LabelList'),
  RoleList: t('component.baseSelectUser.BaseSelectUserErrorMessageEnum.RoleList'),
  ServiceProviderList: t('component.baseSelectUser.BaseSelectUserErrorMessageEnum.ServiceProviderList'),
  projectTeamList:t('component.baseSelectUser.BaseSelectUserErrorMessageEnum.ProjectTeamList'),
  ServiceProvideQualificationList: t('component.baseSelectUser.BaseSelectUserErrorMessageEnum.ServiceProvideQualificationList'),
  DepartmentUserList: t('component.baseSelectUser.BaseSelectUserErrorMessageEnum.DepartmentUserList'),
  RoleUserList: t('component.baseSelectUser.BaseSelectUserErrorMessageEnum.RoleUserList'),
  SearchUserList: t('component.baseSelectUser.BaseSelectUserErrorMessageEnum.SearchUserList'),
  SearchMoreUserList: t('component.baseSelectUser.BaseSelectUserErrorMessageEnum.SearchMoreUserList'),
  ServiceProviderTypeList: t('component.baseSelectUser.BaseSelectUserErrorMessageEnum.ServiceProviderTypeList'),
  FilterFormEmpty: t('component.baseSelectUser.BaseSelectUserErrorMessageEnum.FilterFormEmpty'),
}

// 选人组件 警告信息 枚举
const BaseSelectUserWarnMessageEnum = {
  DepartmentRootList: t('component.baseSelectUser.BaseSelectUserWarnMessageEnum.DepartmentRootList'),
  DepartmentList: t('component.baseSelectUser.BaseSelectUserWarnMessageEnum.DepartmentList'),
  RoleUserList: t('component.baseSelectUser.BaseSelectUserWarnMessageEnum.RoleUserList'),
  ServiceProviderList: t('component.baseSelectUser.BaseSelectUserWarnMessageEnum.ServiceProviderList'),
  SearchMoreUserList: t('component.baseSelectUser.BaseSelectUserWarnMessageEnum.SearchMoreUserList'),
}

enum BaseSelectUserComponentNameEnum {
  // 基础选人组件
  BaseSelectUser = 'base-select-user',
  // 基础选人组件 input 模式组件
  BaseSelectUserInput = 'base-select-user-input',
  // 基础选人组件 搜索头部组件
  BaseSelectUserSearchHeader = 'base-select-user-search-header',
  // 基础选人组件 用户列表组件
  BaseSelectUserUserList = 'base-select-user-user-list',
  // 基础选人组件 用户项组件
  BaseSelectUserUserItem = 'base-select-user-user-item',
  // 基础选人组件 选人组件内容
  BaseSelectUserSelectContent = 'base-select-user-select-content',
  // 基础选人组件 操作栏组件 (包括 tab 选项卡 和 filter 筛选)
  BaseSelectUserOperateBar = 'base-select-user-operate-bar',
  // 基础选人组件 操作栏 tabs 选项卡 组件 
  BaseSelectUserOperateBarTabs = 'base-select-user-operate-bar-tabs',
  BaseSelectUserTree = 'base-select-user-tree',
  // 基础选人组件 部门组件
  BaseSelectUserDepartment = 'base-select-user-department',
  BaseSelectUserDepartmentLeft = 'base-select-user-department-left',
  BaseSelectUserDepartmentRight = 'base-select-user-department-right',
  // 基础选人组件 服务商组件
  BaseSelectUserServiceProvider = 'base-select-user-service-provider',
  BaseSelectUserServiceProviderLeft = 'base-select-user-service-provider-left',
  BaseSelectUserServiceProviderRight = 'base-select-user-service-provider-right',
  // 基础选人组件 角色组件
  BaseSelectUserRole = 'base-select-user-role',
  BaseSelectUserRoleLeft = 'base-select-user-role-left',
  BaseSelectUserRoleRight = 'base-select-user-role-right',
  // 基础选人组件 部门项组件
  BaseSelectUserDepartmentItem = 'base-select-user-department-item',
  // 基础选人组件 部门 tab 选项卡 组件
  BaseSelectUserDepartmentTab = 'base-select-user-department-tab',
  // 基础选人组件 选人面板
  BaseSelectUserSelectPanel = 'base-select-user-select-panel',
  // 基础选人组件 选人面板
  BaseSelectUserSelectPanelLeft = 'base-select-user-select-panel-left',
  BaseSelectUserSelectPanelContainer = 'base-select-user-select-panel-container',
  // 基础选人组件 选人面板
  BaseSelectUserSelectPanelRight = 'base-select-user-select-panel-right',
  // 基础选人组件 已选择面板
  BaseSelectUserSelectedPanel = 'base-select-user-selected-panel',
  // 基础选人组件 底部
  BaseSelectUserFooter = 'base-select-user-footer',
  // 基础选人组件 角色 tab 选项卡组件
  BaseSelectUserRoleTab = 'base-select-user-role-tab',
  // 基础选人组件 角色项组件
  BaseSelectUserRoleItem = 'base-select-user-role-item',
  // 基础选人组件 服务商 tab 选项卡组件
  BaseSelectUserServiceProviderTab = 'base-select-user-service-provider-tab',
  // 基础选人组件 服务商每一项组件
  BaseSelectUserServiceProviderItem = 'base-select-user-service-provider-item',
  // 基础选人组件 返回按钮组件
  BaseSelectUserBackButton = 'base-select-user-back-button',
  // 基础选人组件 无限滚动用户组件
  BaseSelectUserInfiniteScrollUser = 'base-select-user-infinite-scroll-user',
  // 基础选人组件 搜索用户面板组件
  BaseSelectUserSearchUserPanel = 'base-select-user-search-user-panel',
  // 基础选人组件 搜索用户分组组件
  BaseSelectUserSearchUserGroup = 'base-select-user-search-user-group',
  // 基础选人组件 无数据展示组件
  BaseSelectUserNoDataView = 'base-select-user-no-data-view',
  // 基础选人组件 筛选组件
  BaseSelectUserFilter = 'base-select-user-filter',
  // 基础选人组件 筛选按钮组件
  BaseSelectUserFilterButton = 'base-select-user-filter-button',
  // 基础选人组件 筛选角色组件
  BaseSelectUserFilterRole = 'base-select-user-filter-role',
  // 基础选人组件 筛选部门组件
  BaseSelectUserFilterDepartment = 'base-select-user-filter-department',
  // 基础选人组件 表单组件
  BaseSelectUserForm = 'base-select-user-form',
  // 基础选人组件 表单项组件
  BaseSelectUserFormItem = 'base-select-user-form-item',
  // 基础选人组件 表单文本字段组件
  BaseSelectUserFormTextField = 'base-select-user-form-text-field',
  // 基础选人组件 表单下拉框组件
  BaseSelectUserFormSelectField = 'base-select-user-form-select-field',
  // 基础选人组件 表单工作状态组件
  BaseSelectUserFormStateField = 'base-select-user-form-state-field',
  // 基础选人组件 面包屑导航组件
  BaseSelectUserBreadCrumb = 'base-select-user-bread-crumb',
  // 基础选人组件 面包屑导航项组件
  BaseSelectUserBreadCrumbItem = 'base-select-user-bread-crumb-item',
  // 基础选人组件 已选择项组件
  BaseSelectUserSelectedItem = 'base-select-user-selected-item',
  // 基础选人组件 动态获取
  BaseSelectUserDynamic = 'base-select-user-dynamic',
  BaseSelectUserDynamicTab = 'base-select-user-dynamic-tab',
  // 基础选人组件 动态获取项组件
  BaseSelectUserDynamicItem = 'base-select-user-dynamic-item',
  // 基础选人组件 按项目组
  BaseSelectUserProjectTeamTab = 'base-select-user-project-team-tab',
  BaseSelectUserProjectTeamLeft = 'base-select-user-project-team-left',
  BaseSelectUserProjectTeamRight = 'base-select-user-project-team-right'
}

/* 选人组件模式枚举 */
enum BaseSelectUserModeEnum {
  // 全部模式，显示已删除，待分配，已注销
  All = 'all',
  // 过滤模式，不显示已删除，不显示待分配，不显示已注销
  Filter = 'filter'
}

enum BaseSelectUserTypeServiceProviderEnum {
  All = '',
  Department = 0,
  ServiceProvider = 1,
}

export {
  BaseSelectUserTypeEnum,
  BaseSelectUserMarkTypeEnum,
  BaseSelectUserTypeIdEnum,
  BaseSelectUserErrorMessageEnum,
  BaseSelectUserWarnMessageEnum,
  BaseSelectUserComponentNameEnum,
  BaseSelectUserModeEnum,
  BaseSelectUserSearchMoreTypeEnum,
  BaseSelectUserTypeServiceProviderEnum
}
